#include<stdio.h>
int any(char [],char[]);
int main()/* locating first occurence of any character of s2 in s1 */
{
  char s1[30];
  char s2[30];
  printf("enter a string");
  fgets(s1,30,stdin);
  printf("enter another string");
  fgets(s2,30,stdin);
  printf("the location found is %d",any(s1,s2));
  return 0;
}

int any(char s1[],char s2[])
{
  int i=0,j,flag=0;
  while(s1[i]!='\0')
  {
    for(j=0;s2[j]!='\0';j++)
      {
        if(s1[i]==s2[j])
          {
            flag=1;
            break;
           }
       }
     if(flag==1)
        return (i+1);
     else
        i++;
  }
  return -1;
}
   
  
